import Main from "@/views/Main.vue";
// 不作为Main组件的子页面展示的页面单独写，如下
export const page404 = {
	path: "/404",
	name: "error-404",
	meta: {
		title: "404-页面不存在",
	},
	component: () => import("@/views/error-page/404.vue"),
};
export const page403 = {
	path: "/403",
	meta: {
		title: "403-权限不足",
	},
	name: "error-403",
	component: () => import("@/views/error-page/403.vue"),
};
export const page500 = {
	path: "/500",
	meta: {
		title: "500-服务端错误",
	},
	name: "error-500",
	component: () => import("@/views/error-page/500.vue"),
};
export const loginRouter = {
	path: "/home",
	name: "home",
	meta: {
		title: "殿堂学术",
	},
	component: () => import("@/views/home.vue"),
};
export const ThesisGuidanceRouter = {
	path: "/ThesisGuidance",
	name: "ThesisGuidance",
	meta: {
		title: "论文辅导",
	},
	component: () => import("@/views/ThesisGuidance.vue"),
};
export const OverseasOutstandingYouthRouter = {
	path: "/OverseasOutstandingYouth",
	name: "OverseasOutstandingYouth",
	meta: {
		title: "海外优青",
	},
	component: () => import("@/views/OverseasOutstandingYouth.vue"),
};
export const TalentProjectRouter = {
	path: "/TalentProject",
	name: "TalentProject",
	meta: {
		title: "人才项目",
	},
	component: () => import("@/views/TalentProject.vue"),
};
export const NationalNaturalRouter = {
	path: "/NationalNatural",
	name: "NationalNatural",
	meta: {
		title: "国自然",
	},
	component: () => import("@/views/NationalNatural.vue"),
};
export const ScientificResearchDrawingsRouter = {
	path: "/ScientificResearchDrawings",
	name: "ScientificResearchDrawings",
	meta: {
		title: "科研绘图",
	},
	component: () => import("@/views/ScientificResearchDrawings.vue"),
};
export const pptRouter = {
	path: "/ppt",
	name: "ppt",
	meta: {
		title: "PPT润色",
	},
	component: () => import("@/views/ppt.vue"),
};
export const ResearchInformationRouter = {
	path: "/ResearchInformation",
	name: "ResearchInformation",
	meta: {
		title: "科研资料",
	},
	component: () => import("@/views/ResearchInformation.vue"),
};
export const searchInputRouter = {
	path: "/searchInput",
	name: "searchInput",
	meta: {
		title: "科研资料",
	},
	component: () => import("@/views/searchInput.vue"),
};
export const companyprofileInfoRouter = {
	path: "/companyprofileInfo",
	name: "companyprofileInfo",
	meta: {
		title: "公司介绍",
	},
	component: () => import("@/views/companyprofileInfo.vue"),
};
export const detailspageRouter = {
	path: "/detailspage",
	name: "detailspage",
	meta: {
		title: "详情信息"
	},
	component: () => import("@/views/detailspage.vue"),
};
export const haiwaiListdetailsRouter = {
	path: "/haiwaiListdetails",
	name: "haiwaiListdetails",
	meta: {
		title: "海优招聘"
	},
	component: () => import("@/views/haiwaiListdetails.vue"),
};
// export const locking = {
//   path: '/locking',
//   name: 'locking',
//   component: () => import('@/views/main-components/lockscreen/components/locking-page.vue')
// };
// 作为Main组件的子页面展示但是不在左侧菜单显示的路由写在otherRouter里
export const otherRouter = {
	path: "/",
	name: "otherRouter",
	redirect: "/home",
	component: Main,
	children: [
		{
			path: "home",
			title: "首页",
			name: "home_index",
			component: () => import("@/views/home/home.vue"),
		},
		{
			path: "ownspace",
			title: "个人中心",
			name: "ownspace_index",
			component: () => import("@/views/own-space/own-space.vue"),
		},
	],
};
// 作为Main组件的子页面展示并且在左侧菜单显示的路由写在appRouter里
export const appRouter = [
	{
		path: "/earlyInformation",
		icon: "social-buffer",
		name: "earlyInformation",
		title: "预警信息",
		component: Main,
		children: [
			{
				path: "/early",
				title: "预警信息",
				name: "early",
				classIcon: "i-icon i-icon-createtask_fill",
				icon: "",
				meta: {
					title: "预警信息",
					keepAlive: false, // 需要缓存页面
				},
				component: () => import("@/views/page/earlyInformation/early.vue"),
			},
		],
	},
	{
		path: "sysManagement",
		icon: "social-buffer",
		name: "sysManagement",
		title: "配置",
		component: Main,
		children: [
			{
				path: "/organizer",
				title: "街道账号",
				name: "organizer",
				classIcon: "i-icon i-icon-createtask_fill",
				icon: "",
				meta: {
					title: "街道账号",
					keepAlive: false, // 需要缓存页面
				},
				component: () => import("@/views/page/userManagement/organizer.vue"),
			},
			{
				path: "/personnel",
				title: "街道人员",
				name: "personnel",
				classIcon: "i-icon i-icon-createtask_fill",
				icon: "",
				meta: {
					title: "街道人员",
					keepAlive: false, // 需要缓存页面
				},
				component: () => import("@/views/page/userManagement/personnel.vue"),
			},
		],
	},
];
// 所有上面定义的路由都要写在下面的routers里
export const routers = [
	loginRouter,
	otherRouter,
	ThesisGuidanceRouter,
	OverseasOutstandingYouthRouter,
	TalentProjectRouter,
	NationalNaturalRouter,
	ScientificResearchDrawingsRouter,
	pptRouter,
	ResearchInformationRouter,
	detailspageRouter,
	companyprofileInfoRouter,
	searchInputRouter,
	haiwaiListdetailsRouter,
	// locking,
	...appRouter,
];
